package com.coincalf.admin.service;

import com.alicp.jetcache.anno.CacheType;
import com.alicp.jetcache.anno.Cached;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.coincalf.admin.dto.TurnoverOrderCountDTO;
import com.coincalf.admin.dto.UserBlanceTopDTO;
import com.coincalf.admin.dto.UserCountRegDTO;
import com.coincalf.admin.dto.UserDTO;
import com.coincalf.admin.entity.User;
import com.baomidou.mybatisplus.service.IService;
import com.coincalf.framework.constants.Constant;
import com.coincalf.framework.enums.AdminUserType;

import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author qiang
 * @since 2018-05-13
 */
public interface UserService extends IService<User>, Constant {

    /**
     * 获取管理员账户
     *
     * @param adminUserType 管理员类型
     * @return
     */
    @Cached(name = CACHE_KEY_C2C_ADMIN_USER, cacheType = CacheType.BOTH)
    User queryAdminUser(AdminUserType adminUserType);

    /**
     * 注册统计
     * @param page
     * @param wrapper
     * @return
     */
    Page<UserCountRegDTO> selectRegCountPage(Page<UserCountRegDTO> page, Wrapper<UserCountRegDTO> wrapper);

    /**
     * 持仓排行
     * @param page
     * @param wrapper
     * @return
     */
    Page<UserBlanceTopDTO> selectBalanceTopPage(Page<UserBlanceTopDTO> page, Wrapper<UserBlanceTopDTO> wrapper);

    /**
     * #持币人数
     * @param coins
     * @return
     */
    List<TurnoverOrderCountDTO> selectUserCount(String[]coins );


    Page<UserDTO>selectListPage(Page<UserDTO> var1, Wrapper<UserDTO> var2);

}
